/*
 * Copyright (c) 2016- 2020 qolome.com Inc. All Rights Reserved.
 * ProjectName: qolome-knowledge
 * FileName: CoursePackage.java
 * Author: jiangfeng@qolome.com
 * Date: 2020/3/11 上午8:19
 * LastModified: 2020/03/11 08:19:11
 */

package com.qolome.knowledge.design.pattern.composite.demo.transparent;

import lombok.extern.slf4j.Slf4j;

/**
 * @author Qolome
 * @version V1.0
 * @Description 课程
 * @date 2020年 03月11日 08:19:26
 */
@Slf4j
public class Course extends CourseComponet{


private String name;

    private double price;

    @Override
    public Double getPrice(CourseComponet courseComponet) {
        return this.price;
    }

    @Override
    public String getName(CourseComponet courseComponet) {
        return this.name;
    }

    @Override
    public void print() {
        log.info("course: name:{},price:{}RMB",name,price);
    }

    public Course(String name, double price){
        this.name = name;
        this.price = price;


    }

}
